package org.jivesoftware.openfire.plugin.model;

import org.jivesoftware.util.JiveConstants;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * @author lyusantu@gmail.com
 * @version 1.0
 * @description 聊天记录
 * @date 2018-10-16
 */
public class ChatLogs implements Serializable{

    private static final long serialVersionUID = -7887702545810673104L;

    private long messageId;

    private String sessionJid;

    private String sender;

    private String senderName;

    private String senderHeadFile;

    private String receiver;

    private String receiverName;

    private String receiverHeadFile;

    private String content;

    private String detail;

    private int length;

    private int state;

    private Timestamp createDate;

    private String uuid;

    private Integer type;

    /**
     * 标志
     */
    private String flag;

    public interface LogState {
        int show = 0;
        int remove = 1;
    }

    public class ChatLogsConstants extends JiveConstants {
        // 日志表id自增对应类型
        public static final int CHAT_LOGS = 52;
        // 用户在线统计id自增对应类型
        public static final int USER_ONLINE_STATE = 53;
    }

    public ChatLogs() {
    }

    public String getFlag() {
        return flag;
    }

    public void setFlag(String flag) {
        this.flag = flag;
    }

    public ChatLogs(String sender, String receiver, String uuid) {
        this.sender = sender;
        this.receiver = receiver;
        this.uuid = uuid;
    }

    public ChatLogs(String receiver, String uuid) {
        this.receiver = receiver;
        this.uuid = uuid;
    }

    public ChatLogs(String sessionJid, String content, String detail, int length, Timestamp createDate) {
        this.sessionJid = sessionJid;
        this.content = content;
        this.detail = detail;
        this.length = length;
        this.createDate = createDate;
    }

    public ChatLogs(long messageId, String sessionJid, String content, String detail, int length, int state, Timestamp createDate) {
        this.messageId = messageId;
        this.sessionJid = sessionJid;
        this.content = content;
        this.detail = detail;
        this.length = length;
        this.state = state;
        this.createDate = createDate;
    }

    public String getSenderName() {
        return senderName;
    }

    public void setSenderName(String senderName) {
        this.senderName = senderName;
    }

    public String getSenderHeadFile() {
        return senderHeadFile;
    }

    public void setSenderHeadFile(String senderHeadFile) {
        this.senderHeadFile = senderHeadFile;
    }

    public String getReceiverName() {
        return receiverName;
    }

    public void setReceiverName(String receiverName) {
        this.receiverName = receiverName;
    }

    public String getReceiverHeadFile() {
        return receiverHeadFile;
    }

    public void setReceiverHeadFile(String receiverHeadFile) {
        this.receiverHeadFile = receiverHeadFile;
    }

    public long getMessageId() {
        return messageId;
    }

    public void setMessageId(long messageId) {
        this.messageId = messageId;
    }

    public String getSessionJid() {
        return sessionJid;
    }

    public void setSessionJid(String sessionJid) {
        this.sessionJid = sessionJid;
    }

    public String getSender() {
        return sender;
    }

    public void setSender(String sender) {
        this.sender = sender;
    }

    public String getReceiver() {
        return receiver;
    }

    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public int getLength() {
        return length;
    }

    public void setLength(int length) {
        this.length = length;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }
}
